package cn.changein.framework.fastDFS;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import lombok.Data;

/**
 * 上传文件后的数据返回对象，便于前台获取数据.
 * <p>
 *

 * @version 1.0
 * @date 2017-10-15 16:36
 */
@Data
public class FileResponseData {

    /**
     * 返回状态编码
     */
    @JsonInclude(Include.NON_NULL)
    private String code;

    /**
     * 返回信息
     */
    @JsonInclude(Include.NON_NULL)
    private String message;

    /**
     * 成功标识
     */
    private boolean success = true;

    /**
     * 文件路径
     */
    @JsonInclude(Include.NON_NULL)
    private String filePath;
    /**
     * 视频文件缩略图
     */
    @JsonInclude(Include.NON_NULL)
    private String fileThumb;

    /**
     * 文件名称
     */
    @JsonInclude(Include.NON_NULL)
    private String fileName;

    /**
     * 文件类型
     */
    @JsonInclude(Include.NON_NULL)
    private String fileType;

    /**
     * Http URL
     */
    @JsonInclude(Include.NON_NULL)
    private String httpUrl;

    /**
     * Http Token
     */
    @JsonInclude(Include.NON_NULL)
    private String token;

    /**
     * 高度
     */
    private Integer height;
    /**
     * 宽度
     */
    private Integer width;


    public FileResponseData() {
    }

    public FileResponseData(boolean success) {
        this.success = success;
    }

}
